package com.xlzcx.xltz.controller;

import com.xlzcx.xltz.entity.BPraise;
import com.xlzcx.xltz.filter.SkipLogin;
import com.xlzcx.xltz.service.b_praise.BPraiseService;
import com.xlzcx.xltz.utils.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 作者: 李咨辰
 * 文件名: BPraiseController.java
 * 路径: com.xlzcx.xltz.controller
 * 时间: 2024-10-23 12:16
 * 版本: 1.0
 * 描述: TODO 点赞
 **/
@RestController
@RequestMapping("/praise")
public class BPraiseController {
    /**
     * 调用业务层
     */
    @Resource
    private BPraiseService bPraiseService;

    /**
     * 新增点赞
     *
     * @param bPraise 点赞数据
     * @return 成功true, 失败false
     */
    @SkipLogin
    @PostMapping("/controlsPraise")
    public R controlsPraise(@RequestBody BPraise bPraise) {
        return R.ok().put("data", bPraiseService.controlsPraise(bPraise));
    }


}
